﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin_Master.master" AutoEventWireup="true" CodeFile="order.aspx.cs" Inherits="admin_Order" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <ul id="top-navigation">
        
        <li><span><span><a href="user.aspx">Users</a></span></span></li>
        <li ><span><span><a href="product.aspx">Products</a></span></span></li>
        <li><span><span><a href="category.aspx">Category</a></span></span></li>
        <li class="active"><span><span><a href="order.aspx">Orders</a></span></span></li>
        
    </ul>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     
    <br />
    <div class="select-bar">
        <label>
            <asp:TextBox ID="txtSearchOrder" runat="server"></asp:TextBox>
        </label>
        <label>
            <asp:Button ID="Button1" runat="server" Text="Search" OnClick="Button1_Click" />
        </label>
    </div>
    <div class="table">


        <asp:GridView ID="gvOrder" runat="server" AutoGenerateColumns="False" >
            <Columns>
                <asp:TemplateField HeaderText="Tên người đặt" SortExpression="UserName">
                    <ItemTemplate>
                        <asp:Label ID="lblProId" runat="server" Text='<%# Bind("OrderId") %>' Visible="False"></asp:Label>
                        <asp:Label ID="lblProName" runat="server" Text='<%# Bind("UserName") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" CssClass="StyleProduct" />
                    <ItemStyle HorizontalAlign="Center" CssClass="StyleProduct" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Ngày đặt hàng" SortExpression="OrderDate">
                    <ItemTemplate>
                        <asp:Label ID="lblCateName" runat="server" Text='<%# Bind("OrderDate") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" CssClass="StyleCate" />
                    <ItemStyle HorizontalAlign="Center" CssClass="StyleCate" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Tên người nhận" SortExpression="NameOfReceiver">
                    <ItemTemplate>
                        <asp:Label ID="lblPrice" runat="server" Text='<%# Bind("NameOfReceiver") %>'></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" CssClass="StyleHeader" />
                    <ItemStyle HorizontalAlign="Center" CssClass="StyleShort" />
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Trạng thái" SortExpression="Status">
                    <ItemTemplate>
                        <asp:CheckBox ID="chbxIsSaleItem" runat="server" Checked='<%# Bind("Status") %>' Enabled="False" />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" CssClass="StyleShortShort" />
                    <ItemStyle HorizontalAlign="Center" CssClass="StyleShortShort" />
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="Detail" SortExpression="Detail">
                    <ItemTemplate>
                        <asp:HyperLink ID="LinkDetail" runat="server" NavigateUrl='<%# "detailOrder.aspx?command=detail&orderid=" + Eval("OrderId")%> '>Detail</asp:HyperLink>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" CssClass="StyleCommand" />
                    <ItemStyle HorizontalAlign="Center" CssClass="StyleCommand" />
                </asp:TemplateField>

            </Columns>
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="#9097A9" Font-Bold="True" Width="100px" ForeColor="White" Height="30" />
            <PagerStyle BackColor="#9097A9" ForeColor="White" HorizontalAlign="Center" Font-Size="13" />
            <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="White" />
            <RowStyle BackColor="#D8D8D8" ForeColor="black" />
            <SortedAscendingCellStyle BackColor="#FAFAE7" />
            <SortedAscendingHeaderStyle BackColor="#DAC09E" />
            <SortedDescendingCellStyle BackColor="#E1DB9C" />
            <SortedDescendingHeaderStyle BackColor="#C2A47B" />
        </asp:GridView>
        <br />

    </div>
</asp:Content>

